<%@ include file="header.jsp" %>
<%@ page import="com.UI" %>

<script>document.getElementById("rulesButton").className += "active";</script>

<div class="page-header">
	<h1>Rules</h1>
</div>

<table class="table table-hover">
	<tr>
		<th>ID</th>
		<th>Rule name</th>
		<th>Data field</th>
		<th>Specification</th>
		<th>Boundary type</th>
		<th>Boundary condition</th>
		<% theUser = new User();
			if (theUser.isAdmin(request.getSession().getId())){ %>
			<th><!-- placeholder for edit button --></th>
			<th><!-- placeholder for delete button --></th>
		<% } %>
	</tr>
	<%
		if (theUser.isAdmin(request.getSession().getId()))
			out.print(new UI().displayRules(true));
		else
			out.print(new UI().displayRules(false));
	 %>
</table>

<%@ include file="footer.jsp" %>